{{#dropdown-widget class="combo-box" events=this open=(mut open) active=(mut viewValue) focused=value orderItemsForSearch=orderItemsForSearch valuesEqual=valuesEqual menuContainer=menuContainer menuClass=menuClass menuAlign=menuAlign onClose=(action 'menuClosed')  as |widget|}}
    {{#if (eq widget.section 'widget')}}
        <div class="combo-input">
            {{input id=inputId type="text" class=(concat "form-control dropdown-toggle " inputClass) value=query escape-press=(action widget.closeMenu 'escape') focus-in=(chain-actions widget.openMenu widget.focusIn) bubbles=true focus-out=(chain-actions widget.focusOut (action 'restoreFocus')) spellcheck=spellcheck}}
            <span class="caret-container" {{action widget.toggleMenu 'button'}}>
                <span class="caret"></span>
            </span>
        </div>
        {{currentValue}}
    {{else if (eq widget.section 'menu')}}
        {{#if hasBlock}}
            {{yield (hash menu=widget.menu header=widget.header item=widget.item divider=widget.divider query=query setValue=(action 'setValue') setViewValue=(action 'setViewValue') setValueAndClose=(action 'setValueAndClose') closeMenu=widget.closeMenu)}}
        {{else}}
            {{#each choices as |choice|}}
                {{#widget.item value=choice action=(action 'setValueAndClose' choice)}}
                    {{#if valueAttribute}}
                        {{get choice valueAttribute}}
                    {{else}}
                        {{choice}}
                    {{/if}}
                {{/widget.item}}
            {{/each}}
        {{/if}}
    {{/if}}
{{/dropdown-widget}}
